<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;

class fix_td_ts extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'songshu:fix_td_ts';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '修复徒弟徒孙';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $all = [
31737,
32684,
32749,
33180,
34467,
34940,
34954,
35045,
35048,
35141,
35157,
35180,
35280,
35435,
35501,
35904,
36111,
36499,
36548,
36730,
36861,
36881,
36929,
36984,
37151,
37176,
37271,
37610,
37719,
37806,
37857,
37869,
38082,
38242,
38278,
38341,
38342,
38385,
38505,
38512,
38527,
38529,
38743,
38763,
38868,
39170,
39187,
39309,
39412,
39845,
40269,
40463,
40490,
40734,
40975,
41364,
41393,
41481,
41489,
41609,
41777,
41982,
42007,
42264,
42647,
42855,
43748,
44707,
44822,
44866,
44992,
45525,
45557,
45820,
46335,
46463,
46668,
46986,
47436,
48006,
48167,
48171,
48239,
48360,
48658,
48826,
48981,
49250,
49580,
49748,
50145,
51671,
52115,
53087,
53610,
54225,
54320,
55032,
55456,
56083,
56317,
57009,
57262,
57466,
57564,
57969,
58060,
58266,
58844,
60267,
61229,
61570,
62054,
62925,
65161,
65345,
65669,
67562,
67809,
68734,
68814,
69153,
69930,
70247,
70308,
72588,
72939,
73835,
74237,
74625,
75267,
76485,
76843,
77905,
80385,
82424,
83488,
84096,
85956,
86295,
88392,
88401,
88523,
92423,
92619,
95180,
95513,
95926,
97104,
97169,
99167,
101921,
101935,
102992,
104647,
104850,
107515,
107523,
108871,
108888,
109009,
109432,
109580,
110917,
111093,
111243,
111473,
112177,
113098,
114798,
115590,
116851,
117605,
117862,
118516,
118682,
119118,
119781,
123438,
123456,
123464,
126259,
126434,
127536,
129002,
129439,
130811,
131843,
131922,
132001,
132026,
132953,
133856,
134421,
134455,
134467,
134923,
135067,
135462,
135517,
135666,
135667,
135786,
135828,
135934,
136532,
136635,
137449,
137510,
137581,
137733,
138415,
138470,
139378,
139392,
139456,
140035,
140172,
140295,
140300,
140381,
140578,
140681,
140725,
140737,
140806,
142040,
142288,
142461,
143251,
143641,
143646,
144520,
144621,
144698,
144828,
145695,
145762,
145896,
146225,
146572,
146641,
146678,
147055,
147258,
147369,
147650,
148152,
148268,
148297,
148317,
149167,
151211,
151538,
152226,
152248,
152286,
152291,
152314,
152359,
152370,
152523,
152542,
152629,
152661,
152690,
153204,
153385,
153406,
153728,
153801,
153877,
153986,
154038,
154085,
154107,
154332,
154531,
154884,
154994,
155082,
155152,
155154,
155170,
155664,
155903,
156155,
156213,
156262,
156282,
156445,
156554,
156794,
157073,
157119,
157125,
157243,
157304,
157314,
157326,
157436,
157439,
157477,
157492,
158324,
158363,
159211,
159240,
159320,
159342,
159417,
159505,
159958,
160052,
160055,
160404,
160832,
160870,
161385,
161545,
161732,
162265,
162279,
162332,
162345,
162431,
162461,
162577,
162833,
162983,
163005,
163571,
163718,
163785,
163804,
164197,
164333,
164553,
165036,
165073,
165090,
165206,
165253,
165475,
165618,
165839,
165870,
166271,
166396,
167128,
167170,
167198,
167237,
167306,
167437,
167576,
167620,
167872,
167900,
167916,
168044,
168460,
168468,
168475,
168497,
168636,
169021,
169047,
169336,
169357,
169384,
169682,
169831,
170117,
170143,
170248,
170316,
170348,
170480,
170599,
170696,
170877,
170893,
170984,
171073,
171078,
171300,
171446,
171460,
171563,
171840,
171845,
172484,
172654,
172773,
172819,
172892,
172996,
173008,
173059,
173090,
173130,
173140,
173263,
173456,
173628,
173791,
173960,
173968,
174014,
174353,
174396,
174439,
174617,
174703,
174747,
174877,
174883,
175140,
175286,
175325,
175371,
175527,
175645,
175887,
175935,
175998,
176010,
176282,
176339,
176516,
176585,
176669,
176894,
176912,
176950,
176987,
177077,
177251,
177351,
177611,
177616,
178047,
178385,
178445,
178639,
178700,
178866,
178945,
179046,
179057,
179339,
179346,
179528,
179800,
179889,
179978,
180155,
180407,
180743,
181093,
181384,
181526,
181530,
181685,
181881,
181907,
181967,
182163,
182370,
182378,
182624,
182664,
182673,
182704,
182747,
182790,
182938,
183155,
183279,
183471,
183580,
183587,
183797,
183851,
183922,
184340,
184375,
184434,
184475,
184494,
184554,
184560,
184597,
184640,
184672,
184704,
184709,
184725,
184773,
184882,
184940,
184991,
185045,
185089,
185207,
185452,
185462,
185505,
186004,
186042,
186086,
186136,
186241,
186389,
186480,
186487,
186533,
186635,
186713,
186764,
186793,
186817,
186832,
186902,
186909,
186949,
186965,
187063,
187163,
187250,
187258,
187268,
187571,
187615,
187804,
187824,
187828,
187950,
188083,
188112,
188134,
188170,
188201,
188243,
188250,
188308,
188375,
188926,
188950,
189119,
189242,
189568,
189589,
189876,
190018,
190034,
190121,
190358,
190524,
190552,
190707,
190742,
190793,
190815,
191094,
191108,
191142,
191379,
191470,
191637,
191711,
191889,
191897,
191963,
191965,
191973,
192078,
192088,
192089,
192253,
192329,
192364,
192420,
192425,
192510,
192642,
192715,
192794,
192805,
192862,
192980,
193169,
193228,
193329,
193371,
193554,
193574,
193612,
193614,
193709,
193909,
194140,
194230,
194273,
194349,
194354,
194373,
194784,
194807,
194868,
195000,
195194,
195242,
195587,
195751,
195887,
195892,
196044,
196107,
196178,
196183,
196194,
196196,
196261,
196297,
196302,
196335,
196374,
196388,
196472,
196518,
196604,
196960,
197016,
197051,
197077,
197107,
197149,
197314,
197322,
197357,
197447,
197550,
197603,
197779,
197876,
197883,
197966,
197999,
198064,
198160,
198220,
198285,
198313,
198428,
198431,
198489,
198588,
203588,
208888,
235888,
288888,
288915,
288923,
289080,
289106,
289244,
289269,
289311,
289469,
289586,
289661,
289665,
289722,
289801,
289820,
289840,
289987,
289988,
290165,
290186,
290299,
290306,
290355,
290423,
290444,
290498,
290560,
290655,
290661,
290740,
290849,
290851,
290859,
291010,
291020,
291024,
291084,
291124,
291162,
291181,
291207,
291228,
291229,
291231,
291319,
291397,
291398,
291427,
291451,
291544,
291654,
291670,
291678,
291834,
292103,
292166,
292407,
292671,
292845,
292933,
292989,
293031,
293060,
293089,
293118,
293129,
293196,
293199,
293203,
293225,
293401,
293461,
293521,
293593,
293658,
293734,
293887,
293919,
293951,
294066,
294074,
294109,
294441,
294535,
294583,
294586,
294588,
294600,
294733,
294917,
294937,
295020,
295216,
295339,
295387,
295408,
295411,
295576,
295675,
295721,
295754,
295775,
295806,
295851,
295957,
295964,
295990,
295999,
296044,
296149,
296173,
296247,
296311,
296368,
296396,
296426,
296480,
296509,
296873,
296911,
297002,
297052,
297102,
297231,
297306,
297340,
297462,
297617,
297669,
297732,
297763,
297816,
297856,
298072,
298089,
298168,
298193,
298465,
298509,
298527,
298537,
298548,
298557,
298623,
298711,
298750,
298775,
298795,
298826,
298970,
298989,
299060,
299071,
299094,
299135,
299245,
299273,
299309,
299334,
299342,
299500,
299520,
299585,
299687,
299750,
299771,
299795,
299916,
300012,
300175,
300180,
300183,
300360,
300419,
300458,
300519,
300529,
300569,
300782,
300820,
300833,
300848,
300851,
300876,
300879,
300898,
300972,
301265,
301405,
301446,
301469,
301483,
301548,
301824,
301855,
301942,
301962,
302000,
302010,
302038,
302051,
302085,
302120,
302162,
302184,
302215,
302228,
302275,
302417,
302434,
302456,
302491,
302516,
302540,
302661,
302711,
302768,
302829,
302839,
302841,
302908,
302920,
302963,
302974,
303040,
303054,
303243,
303294,
303310,
303321,
303350,
303391,
303406,
303471,
303509,
303608,
303623,
303702,
303746,
303752,
303814,
303841,
303861,
303871,
304092,
304105,
304121,
304128,
304196,
304232,
304315,
304323,
304330,
304333,
304344,
304483,
304546,
304603,
304698,
304753,
304760,
304762,
304769,
304874,
305076,
305078,
305165,
305215,
305231,
305239,
305243,
305249,
305253,
305264,
305349,
305352,
305390,
305404,
305405,
305484,
305512,
305522,
305538,
305551,
305609,
305646,
305668,
305670,
305718,
305738,
305748,
305818,
305842,
305913,
305952,
305998,
306048,
306079,
306099,
306121,
306127,
306150,
306162,
306186,
306192,
306194,
306198,
306242,
306319,
306433,
306435,
306443,
306522,
306561,
306591,
306596,
306620,
306623,
306635,
306642,
306700,
306722,
306745,
306832,
306900,
306916,
307052,
307060,
307063,
307076,
307119,
307153,
307266,
307412,
307464,
307470,
307528,
307538,
307542,
307548,
307558,
307561,
307601,
307607,
307718,
307736,
307744,
307753,
307773,
307796,
307819,
307862,
307904,
307930,
307972,
308003,
308040,
308053,
308129,
308162,
308186,
308187,
308200,
308288,
308292,
308316,
308321,
308342,
308343,
308347,
308360,
308376,
308405,
308418,
308456,
308487,
308497,
308556,
308559,
308577,
308597,
308610,
308657,
308660,
308722,
308745,
308751,
308754,
308763,
308768,
308783,
308792,
308831,
308855,
308907,
308918,
308934,
308947,
308949,
308961,
308980,
309052,
309121,
309135,
309138,
309195,
309202,
309209,
309240,
309256,
309338,
309339,
309363,
309406,
309415,
309420,
309428,
309437,
309456,
309477,
309519,
309525,
309567,
309574,
309603,
309619,
309628,
309630,
309666,
309667,
309701,
309710,
309732,
309775,
309786,
309833,
309836,
309850,
309880,
309882,
309889,
309941,
309968,
309975,
309983,
309987,
310022,
310064,
310073,
310101,
310106,
310125,
310145,
310155,
310173,
310190,
310208,
310263,
310270,
310271,
310294,
310308,
310330,
310355,
310377,
310533,
310547,
310570,
310610,
310628,
310636,
310644,
310669,
310686,
310703,
310706,
310737,
310749,
310764,
310770,
310825,
310882,
310926,
310990,
310997,
311051,
311057,
311065,
311072,
311096,
311116,
311122,
311133,
311155,
311184,
311209,
311259,
311286,
311296,
311301,
311321,
311352,
311371,
311374,
311390,
311393,
311402,
311415,
311416,
311431,
311437,
311438,
311456,
311460,
311463,
311475,
311489,
311490,
311491,
311523,
311544,
311641,
311665,
311682,
311696,
311701,
311707,
311708,
311769,
311842,
311843,
311853,
311854,
311865,
311878,
311879,
311895,
311896,
311905,
311930,
311947,
311954,
311984,
312041,
312093,
312103,
312122,
312127,
312136,
312149,
312161,
312170,
312186,
312202,
312204,
312209,
312228,
312230,
312245,
312252,
312258,
312270,
312290,
312296,
312298,
312299,
312311,
312314,
312316,
312328,
312331,
312340,
312345,
312351,
312354,
312386,
312395,
312408,
312409,
312427,
312428,
312429,
312430,
312437,
312457,
312469,
312476,
312503,
312509,
312511,
312554,
312565,
312570,
312610,
312626,
312637,
312645,
312671,
312672,
312698,
312715,
312717,
312724,
312757,
312777,
312804,
312813,
312820,
312822,
312832,
312835,
312839,
312846,
312848,
312858,
312867,
312869,
312891,
312893,
312908,
312943,
312948,
312975,
312978,
312984,
312999,
313002,
313003,
313006,
313021,
313022,
313029,
313056,
313066,
313078,
313082,
313091,
313096,
313099,
313100,
313102,
313103,
313106,
313112,
313129,
313132,
313139,
313142,
313144,
313157,
313172,
313183,
313192,
313193,
313197,
313225,
313227,
313228,
313229,
313230,
313240,
313242,
313244,
313245,
313275,
313278,
313281,
313282,
313287,
313288,
313289,
313291,
313293,
313301,
313308,
313314,
313315,
313318,
313319,
313320,
313322,
313333,
313337,
313338,
313347,
313354,
313359,
313362,
313366,
313376,
313383,
313386,
313390,
313392,
313403,
313406,
313412,
313415,
313421,
313425,
313446,
313451,
313453,
313454,
313455,
313459,
313474,
313480,
313499,
313516,
313517,
313521,
313523,
313532,
313535,
313538,
313543,
313546,
313556,
313558,
313559,
313569,
313577,
313578,
313605,
313609,
313611,
313612,
313614,
313615,
313620,
313633,
313641,
313647,
313648,
313654,
313656,
313660,
313663,
313692,
313702,
313705,
313710,
313715,
313720,
313722,
313725,
313728,
313730,
313742,
313751,
313776,
313778,
313791,
313802,
313818,
313820,
313824,
313833,
313838,
313857,
313859,
313867,
313882,
313886,
313892,
313903,
313961,
313964,
313965,
313966,
313969,
313970,
313971,
313976,
313992,
313993,
313994,
314005,
314006,
314010,
314027,
314034,
314037,
314045,
314066,
314080,
314081,
314091,
314118,
314120,
314121,
314129,
314135,
314141,
314143,
314152,
314170,
314182,
314213,
314217,
314220,
314222,
314227,
314242,
314260,
314278,
314285,
314286,
314290,
314292,
314298,
314307,
314309,
314310,
314317,
314320,
314345,
314359,
314366,
314367,
314371,
314372,
314385,
314403,
314406,
314418,
314426,
314427,
314436,
314439,
314446,
314454,
314458,
314460,
314463,
314466,
314474,
314483,
314490,
314492,
314493,
314495,
314498,
314500,
314501,
314510,
314512,
314517,
314524,
314533,
314537,
314541,
314545,
314546,
314557,
314558,
314561,
314569,
314579,
314581,
314590,
314608,
314643,
314667,
314680,
314684,
314692,
314705,
314721,
314735,
314739,
314746,
314757,
314778,
314788,
314790,
314792,
314796,
314798,
314813,
314835,
314837,
314844,
314862,
314872,
314881,
314887,
314888,
314891,
314892,
314895,
314900,
314914,
314929,
314952,
314955,
314956,
314970,
314986,
314989,
314994,
315004,
315012,
315015,
315018,
315029,
315039,
315041,
315044,
315055,
315079,
315097,
315118,
315119,
315142,
315147,
315157,
315270,
315277,
315292,
315293,
315296,
315304,
315306,
315324,
315335,
315358,
315371,
315374,
315375,
315379,
315380,
315394,
315396,
315400,
315405,
315407,
315418,
315421,
315449,
315468,
315494,
315504,
315521,
315522,
315526,
315535,
315547,
315551,
315554,
315557,
315562,
315587,
315591,
315617,
315624,
315642,
315656,
315666,
315680,
315696,
315697,
315703,
315704,
315707,
315711,
315712,
315713,
315718,
315728,
315741,
315755,
315759,
315770,
315772,
315777,
315780,
315807,
315825,
315831,
315839,
315844,
315859,
315869,
315870,
315873,
315885,
315888,
315890,
315900,
315903,
315904,
315914,
315928,
315929,
315939,
315942,
315954,
315959,
315981,
315997,
316002,
316005,
316016,
316020,
316043,
316060,
316070,
316081,
316082,
316087,
316113,
316176,
316181,
316188,
316245,
316296,
316302,
316313,
316323,
316338,
316348,
316353,
316370,
316391,
316405,
316412,
316413,
316432,
316439,
316447,
316449,
316483,
316488,
316493,
316517,
316522,
316526,
316529,
316542,
316548,
316549,
316566,
316591,
316602,
316607,
316618,
316621,
316624,
316631,
316655,
316656,
316660,
316689,
316711,
316716,
316720,
316751,
316760,
316768,
316787,
316791,
316792,
316819,
316833,
316838,
316841,
316842,
316843,
316854,
316860,
316884,
316885,
316903,
316933,
316934,
316943,
316972,
316983,
317002,
317006,
317008,
317012,
317016,
317020,
317022,
317026,
317029,
317031,
317038,
317055,
317080,
317081,
317101,
317107,
317108,
317109,
317136,
317137,
317140,
317146,
317148,
317152,
317169,
317173,
317182,
317186,
317195,
317196,
317203,
317204,
317218,
317220,
317221,
317236,
317246,
317263,
317267,
317276,
317289,
317297,
317300,
317303,
317317,
317320,
317321,
317323,
317324,
317355,
317356,
317371,
317383,
317395,
317399,
317405,
317421,
317435,
317446,
317455,
317457,
317464,
317469,
317473,
317487,
317490,
317491,
317505,
317512,
317521,
317524,
317533,
317538,
317546,
317555,
317570,
317584,
317589,
317604,
317605,
317608,
317617,
317633,
317667,
317675,
317678,
317679,
317688,
317690,
317705,
317715,
317727,
317741,
317742,
317743,
317751,
317769,
317784,
317792,
317798,
317800,
317815,
317817,
317828,
317831,
317853,
317855,
317899,
317913,
317914,
317921,
317929,
317942,
317945,
317946,
317963,
317970,
317971,
317995,
317998,
317999,
318017,
318052,
318055,
318074,
318089,
318097,
318100,
318114,
318130,
318134,
318135,
318136,
318150,
318163,
318175,
318185,
318209,
318231,
318286,
318306,
318315,
318324,
318342,
318388,
318389,
318405,
318408,
318413,
318437,
318440,
318448,
318457,
318460,
318480,
318485,
318487,
318497,
318539,
318548,
318557,
318568,
318596,
318639,
318645,
318666,
318682,
318721,
318722,
318728,
318732,
318740,
318747,
318748,
318749,
318750,
318758,
318776,
318779,
318799,
318800,
318805,
318823,
318835,
318843,
318862,
318864,
318867,
318889,
318892,
318901,
318919,
318940,
318944,
318949,
318957,
318959,
318966,
318975,
318989,
318997,
319002,
319013,
319016,
319024,
319025,
319042,
319066,
319067,
319076,
319084,
319085,
319102,
319128,
319157,
319200,
319224,
319228,
319236,
319260,
319272,
319275,
319276,
319292,
319302,
319305,
319317,
319320,
319332,
319345,
319346,
319354,
319369,
319381,
319431,
319436,
319438,
319439,
319465,
319466,
319512,
319530,
319532,
319540,
319542,
319547,
319553,
319554,
319556,
319578,
319582,
319616,
319620,
319621,
319625,
319648,
319670,
319673,
319676,
319708,
319712,
319722,
319752,
319773,
319775,
319783,
319794,
319801,
319803,
319804,
319806,
319807,
319809,
319812,
319850,
319856,
319862,
319880,
319919,
319921,
319939,
319944,
319966,
319973,
319998,
320008,
320041,
320043,
320081,
320108,
320127,
320133,
320150,
320163,
320170,
320174,
320190,
320216,
320221,
320240,
320243,
320262,
320265,
320269,
320271,
320279,
320282,
320289,
320315,
320344,
320350,
320351,
320352,
320355,
320356,
320375,
320376,
320384,
320395,
320399,
320408,
320412,
320417,
320431,
320432,
320440,
320441,
320464,
320466,
320488,
320513,
320514,
320544,
320545,
320548,
320566,
320587,
320597,
320599,
320608,
320617,
320621,
320641,
320663,
320666,
320674,
320681,
320724,
320737,
320749,
320758,
320762,
320799,
320807,
320812,
320819,
320825,
320830,
320846,
320871,
320875,
320877,
320882,
320884,
320893,
320897,
320901,
320930,
320961,
320970,
320975,
320995,
321014,
321042,
321047,
321053,
321065,
321075,
321079,
321087,
321109,
321120,
321128,
321132,
321136,
321146,
321186,
321188,
321190,
321194,
321208,
321233,
321257,
321259,
321263,
321265,
321284,
321285,
321291,
321305,
321312,
321330,
321354,
321370,
321376,
321395,
321397,
321400,
321403,
321406,
321411,
321414,
321423,
321446,
321472,
321476,
321510,
321514,
321523,
321559,
321577,
321591,
321612,
321614,
321617,
321618,
321620,
321631,
321636,
321641,
321649,
321662,
321665,
321683,
321691,
321704,
321706,
321708,
321709,
321711,
321712,
321714,
321716,
321718,
321720,
321722,
321726,
321732,
321738,
321743,
321749,
321751,
321752,
321756,
321760,
321763,
321765,
321771,
321782,
321785,
321804,
321812,
321815,
321818,
321822,
321829,
321833,
321836,
321837,
321868,
321876,
321882,
321888,
321889,
321897,
321905,
321906,
321911,
321917,
321921,
321925,
321934,
321935,
321938,
321939,
321942,
321945,
321964,
321985,
321990,
321998,
322006,
322028,
322030,
322033,
322036,
322038,
322040,
322051,
322053,
322061,
322067,
322074,
322102,
322107,
322111,
322119,
322146,
322160,
322172,
322192,
322201,
322212,
322224,
322229,
322230,
322236,
322241,
322265,
322279,
322281,
322299,
322300,
322301,
322303,
322311,
322332,
322351,
322358,
322371,
322375,
322396,
322398,
322405,
322416,
322417,
322459,
322497,
322519,
322525,
322538,
322543,
322558,
322573,
322576,
322578,
322582,
322590,
322608,
322626,
322635,
322642,
322649,
322654,
322657,
322660,
322663,
322665,
322670,
322671,
322674,
322679,
322688,
322690,
322693,
322700,
322716,
322726,
322733,
322746,
322765,
322767,
322768,
322776,
322782,
322784,
322789,
322807,
322817,
322820,
322824,
322830,
322836,
322844,
322858,
322877,
322883,
322884,
322885,
322886,
322887,
322889,
322892,
322942,
322951,
322957,
322958,
322976,
323013,
323025,
323029,
323044,
323046,
323060,
323065,
323078,
323080,
323099,
323101,
323102,
323113,
323123,
323125,
323129,
323133,
323146,
323175,
323180,
323187,
323189,
323192,
323198,
323204,
323213,
323214,
323217,
323243,
323245,
323247,
323250,
323251,
323261,
323293,
323306,
323308,
323313,
323322,
323332,
323337,
323346,
323348,
323354,
323361,
323372,
323374,
323381,
323385,
323391,
323399,
323401,
323403,
323428,
323430,
323442,
323484,
323488,
323496,
323503,
323507,
323570,
323588,
323593,
323606,
323626,
323646,
323655,
323663,
323674,
323677,
323678,
323683,
323693,
323698,
323714,
323716,
323727,
323728,
323730,
323733,
323742,
323749,
323756,
323761,
323774,
323789,
323796,
323801,
323825,
323826,
323830,
323837,
323845,
323847,
323850,
323870,
323873,
323883,
323893,
323897,
323905,
323925,
323945,
323982,
323983,
323987,
323997,
323999,
324000,
324011,
324025,
324062,
324142,
324151,
324163,
324170,
324177,
324179,
324189,
324207,
324211,
324234,
324256,
324258,
324262,
324270,
324276,
324279,
324283,
324294,
324336,
324339,
324365,
324372,
324375,
324376,
324387,
324394,
324422,
324428,
324435,
324443,
324447,
324448,
324513,
324564,
324566,
324581,
324591,
324598,
324599,
324605,
324617,
324630,
324652,
324653,
324654,
324658,
324660,
324669,
324686,
324707,
324720,
324739,
324742,
324762,
324764,
324767,
324779,
324781,
324792,
324812,
324826,
324831,
324837,
324846,
324853,
324863,
324876,
324888,
324892,
324893,
324908,
324920,
324934,
324938,
324941,
324946,
324949,
324986,
324995,
325012,
325018,
325026,
325028,
325030,
325033,
325034,
325037,
325039,
325043,
325046,
325050,
325062,
325078,
325096,
325097,
325101,
325102,
325128,
325134,
325139,
325151,
325184,
325185,
325187,
325215,
325223,
325227,
325248,
325251,
325259,
325262,
325269,
325270,
325276,
325292,
325296,
325297,
325300,
325303,
325311,
325321,
325322,
325329,
325337,
325349,
325361,
325362,
325371,
325373,
325376,
325384,
325392,
325411,
325413,
325421,
325435,
325441,
325457,
325462,
325480,
325481,
325485,
325492,
325503,
325545,
325564,
325568,
325570,
325574,
325589,
325600,
325601,
325605,
325608,
325611,
325614,
325615,
325618,
325622,
325625,
325633,
325653,
325659,
325660,
325690,
325702,
325705,
325709,
325710,
325712,
325715,
325717,
325718,
325738,
325757,
325774,
325775,
325778,
325788,
325794,
325795,
325802,
325807,
325808,
325850,
325851,
325859,
325890,
325896,
325899,
325900,
325909,
325915,
325918,
325992,
325995,
325998,
326030,
326032,
326034,
326037,
326046,
326052,
326065,
326069,
326079,
326081,
326083,
326085,
326087,
326089,
326100,
326102,
326110,
326111,
326112,
326121,
326122,
326129,
326131,
326134,
326135,
326141,
326150,
326186,
326191,
326224,
326227,
326230,
326233,
326236,
326237,
326242,
326275,
326277,
326294,
326306,
326332,
326335,
326341,
326347,
326357,
326362,
326372,
326373,
326381,
326392,
326403,
326407,
326418,
326423,
326445,
326449,
326451,
326481,
326486,
326500,
326509,
326568,
326575,
326578,
326582,
326596,
326614,
326626,
326629,
326632,
326650,
326670,
326697,
326698,
326716,
326717,
326732,
326742,
326762,
326767,
326776,
326789,
326805,
326806,
326811,
326815,
326828,
326837,
326859,
326863,
326868,
326877,
326881,
326882,
326895,
326908,
326917,
326924,
326926,
326933,
326935,
326936,
326941,
326956,
326959,
326967,
326974,
326976,
326984,
326992,
326993,
326996,
326999,
327000,
327004,
327009,
327012,
327022,
327059,
327060,
327068,
327070,
327074,
327078,
327079,
327089,
327094,
327111,
327113,
327116,
327118,
327120,
327123,
327143,
327144,
327156,
327168,
327203,
327218,
327225,
327232,
327235,
327236,
327237,
327240,
327242,
327276,
327284,
327285,
327288,
327294,
327308,
327313,
327330,
327353,
327355,
327387,
327394,
327415,
327435,
327446,
327450,
327466,
327467,
327485,
327498,
327532,
327536,
327545,
327553,
327560,
327565,
327566,
327567,
327569,
327592,
327601,
327608,
327621,
327628,
327642,
327652,
327664,
327666,
327675,
327685,
327698,
327714,
327720,
327742,
327753,
327759,
327771,
327778,
327796,
327799,
327824,
327826,
327829,
327833,
327850,
327859,
327863,
327874,
327883,
327903,
327947,
327972,
328029,
328051,
328059,
328075,
328088,
328099,
328104,
328127,
328136,
328143,
328144,
328163,
328176,
328185,
328187,
328195,
328249,
328287,
328292,
328300,
328321,
328347,
328352,
328372,
328376,
328377,
328382,
328416,
328432,
328438,
328442,
328468,
328495,
328497,
328504,
328505,
328512,
328524,
328573,
328574,
328589,
328598,
328601,
328605,
328610,
328641,
328662,
328689,
328692,
328717,
328732,
328735,
328754,
328769,
328779,
328783,
328862,
328871,
328902,
328922,
328923,
328958,
328960,
329001,
329022,
329055,
329067,
329094,
329110,
329114,
329120,
329130,
329153,
329155,
329195,
329248,
329309,
329319,
329325,
329349,
329424,
329457,
329477,
329482,
329512,
329527,
329629,
329654,
329723,
];
        foreach($all as $uid){
            $td = DB::table('user_tree')->where([
                'pid'=>$uid
            ])->count();
            $item = DB::table('user_tree')->where('uid',$uid)->first(['hight','tree_id','left','right']);
            $ts = DB::table('user_tree')->where([
                ['hight','=',$item->hight+2],
                ['tree_id','=',$item->tree_id],
                ['left','>',$item->left],
                ['right','<',$item->right]
            ])->count();
            DB::table('user_tree')->where('uid',$uid)->update([
                'td_count'=>$td,
                'ts_count'=>$ts
            ]);
            echo $uid."\n";
        }
    }
}
